module Main where

main::IO()
main = do
	n<-readLn
	print(max_length n)
	
max_length:: [[Int]] -> Int
max_length []=0
max_length (x:xs) = comp (laenge x) (max_length xs)

laenge::[Int]->Int
laenge [] = 0
laenge (x:xs) = 1 + (laenge xs)

comp::Int -> Int -> Int
comp x y
	| x>y = x
	| otherwise = y